﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;

namespace CPRApp.Models
{
    public class BookingModels
    {
        [Required]
        [Display(Name = "Booking Id")]
        public string BookingId { get; set; }

        [Required]
        [DataType(DataType.Date)]
        [Display(Name = "Item Receipt Date")]
        public string ReceiptDate { get; set; }

        [Required]
        [Display(Name = "Customer Name")]
        public string CustomerName { get; set; }

        [Required]
        [Display(Name = "Item Model")]
        public string ItemModel { get; set; }

        [Required]
        [Display(Name = "Item Details")]
        public string ItemDetails { get; set; }

        [Required]
        [Display(Name = "Item Condition")]
        public string ItemCondition { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Work Start Time")]
        public DateTime WorkStartTime { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Estimate Delivery Time")]
        public DateTime EstimateDeliveryTime { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Delivery Time")]
        public DateTime DeliveryTime { get; set; }

        [Required]
        [Display(Name = "Estimate Bill Amount")]
        public int EstimateBillAmount { get; set; }

        [Required]
        [Display(Name = "Bill Amount")]
        public int BillAmount { get; set; }

        [Required]
        [Display(Name = "Cost Amount")]
        public int CostAmount { get; set; }

        [Required]
        [Display(Name = "Time Spent")]
        public int TimeSpent { get; set; }

        public string EntryTime { get; set; }

        [Required]
        [Display(Name = "Issues Reported")]
        public string IssuesReported { get; set; }

        [Required]
        [Display(Name = "Issues Found")]
        public string IssuesFound { get; set; }

        [Required]
        [Display(Name = "Issues Fixed")]
        public string IssuesFixed { get; set; }

        [Required]
        [Display(Name = "Is Under Warrenty")]
        public bool IsInWarrenty { get; set; }

        [Required]
        [Display(Name = "Technicion Name")]
        public string Technicion { get; set; }

        [Required]
        [Display(Name = "Entered By")]
        public string EnteredBy { get; set; }

        public string[] ConditionsList
        {
            get
            {
                return new string[] { "New", "Old Not Repaired", "Old Repaired" };
            }
        }

    }
}